package cn.hd.dao;

import cn.hd.entity.Address;
import cn.hd.entity.Comment;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CommentDao {
    //查询所有的评论
    public List<Comment> selectAll();
    //查询项目id下的所有评论
    public List<Comment> selectAllByPid(Map map);
    //添加
    public  int addComment(Comment comment);
    public  int addUserComment(@Param("uid") long uid, @Param("cid") long cid,@Param("pid") long pid);
    //热评前五条
    public List<Comment> selectCommentAllsrp(long pid);
    //删除
    public int deleteComment(long cid);
    public int deleteCommentUser(long cid);

    //修改
    public int updateComment(Comment comment);
}
